{extend name="public:layout" /}
{block name="content"}
<h4 class="text-success text-center">文章管理</h4>

<table class="table table-striped table-hover text-center">
    <tr>
        <td>ID</td>
        <td>标题</td>
        <td>栏目</td>
        {eq name="$Think.session.is_admin" value="1"}
        <td>作者</td>
        {/eq}
        <td>阅读量</td>
        <td>创建时间</td>
        <td colspan="2">操作</td>
    </tr>
    {volist name="artList" id="art" empty="$empty"}
    <tr>
        <td>{$art.id}</td>
        <td class="text-left">{$art.title}</td>
        <td>{$art.cate_id}</td>
        {eq name="$Think.session.is_admin" value="1"}
        <td>{$art.user_id}</td>
        {/eq}
        <td>{$art.pv}</td>
        <td>{$art.create_time}</td>
        <td><a href="{:url('edit',['id'=>$art.id])}">编辑</a></td>
        <td><a href="{:url('doDel',['id'=>$art.id])}" onclick="return confirm('确定要删除吗')">删除</a></td>
    </tr>
    {/volist}
</table>
<div class="text-center">{$artList|raw}</div>
<!-- 分类需要添加操作 -->
<a class="btn btn-info" href="{:url('edit',['id'=>0])}" role="button">添加文章</a>
{/block}